.class public Lcom/xingbook/baike/d/c;
.super Landroid/view/View;


# instance fields
.field private a:F

.field private b:F

.field private c:F

.field private d:F

.field private e:F

.field private f:I

.field private g:I

.field private h:Lcom/xingbook/baike/b/a;

.field private i:Landroid/graphics/Paint;

.field private j:Landroid/graphics/RectF;

.field private k:Landroid/graphics/Bitmap;

.field private l:Landroid/graphics/Bitmap;

.field private m:Landroid/graphics/Bitmap;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2

    const/4 v0, 0x0

    invoke-direct {p0, p1}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    const v1, -0xcccccd

    iput v1, p0, Lcom/xingbook/baike/d/c;->f:I

    const v1, -0x666667

    iput v1, p0, Lcom/xingbook/baike/d/c;->g:I

    iput-object v0, p0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    instance-of v1, p1, Landroid/app/Activity;

    if-eqz v1, :cond_0

    check-cast p1, Landroid/app/Activity;

    :goto_0
    invoke-static {p1}, Lcom/xingbook/c/n;->b(Landroid/app/Activity;)F

    move-result v0

    iput v0, p0, Lcom/xingbook/baike/d/c;->a:F

    const/high16 v0, 0x420c

    iget v1, p0, Lcom/xingbook/baike/d/c;->a:F

    mul-float/2addr v0, v1

    iput v0, p0, Lcom/xingbook/baike/d/c;->b:F

    const/high16 v0, 0x4244

    iget v1, p0, Lcom/xingbook/baike/d/c;->a:F

    mul-float/2addr v0, v1

    iput v0, p0, Lcom/xingbook/baike/d/c;->c:F

    const/high16 v0, 0x41f8

    iget v1, p0, Lcom/xingbook/baike/d/c;->a:F

    mul-float/2addr v0, v1

    iput v0, p0, Lcom/xingbook/baike/d/c;->d:F

    const/high16 v0, 0x4234

    iget v1, p0, Lcom/xingbook/baike/d/c;->a:F

    mul-float/2addr v0, v1

    iput v0, p0, Lcom/xingbook/baike/d/c;->e:F

    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    new-instance v0, Landroid/graphics/RectF;

    invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V

    iput-object v0, p0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    invoke-virtual {p0}, Lcom/xingbook/baike/d/c;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f020022

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->openRawResource(I)Ljava/io/InputStream;

    move-result-object v0

    invoke-static {v0}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/baike/d/c;->k:Landroid/graphics/Bitmap;

    return-void

    :cond_0
    move-object p1, v0

    goto :goto_0
.end method

.method private a(III)Landroid/graphics/Bitmap;
    .locals 12

    const/16 v1, 0x15

    const/4 v11, 0x1

    const/4 v10, 0x0

    invoke-virtual {p0}, Lcom/xingbook/baike/d/c;->getContext()Landroid/content/Context;

    move-result-object v2

    if-ne p1, p2, :cond_1

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    :goto_0
    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f020021

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->openRawResource(I)Ljava/io/InputStream;

    move-result-object v2

    invoke-static {v2}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;)Landroid/graphics/Bitmap;

    move-result-object v3

    invoke-virtual {v3}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v4

    invoke-virtual {v3}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v5

    sget-object v2, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v4, v5, v2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v2

    new-instance v6, Landroid/graphics/Canvas;

    invoke-direct {v6, v2}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    new-instance v7, Landroid/graphics/Paint;

    invoke-direct {v7}, Landroid/graphics/Paint;-><init>()V

    invoke-virtual {v7, v11}, Landroid/graphics/Paint;->setDither(Z)V

    invoke-virtual {v7, v11}, Landroid/graphics/Paint;->setFilterBitmap(Z)V

    new-instance v8, Landroid/graphics/Rect;

    invoke-direct {v8, v10, v10, v4, v5}, Landroid/graphics/Rect;-><init>(IIII)V

    new-instance v9, Landroid/graphics/Rect;

    invoke-direct {v9, v10, v10, v4, v5}, Landroid/graphics/Rect;-><init>(IIII)V

    invoke-virtual {v6, v3, v8, v9, v7}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    new-instance v3, Landroid/graphics/Paint;

    const/16 v7, 0x101

    invoke-direct {v3, v7}, Landroid/graphics/Paint;-><init>(I)V

    const/high16 v7, 0x4190

    invoke-virtual {v3, v7}, Landroid/graphics/Paint;->setTextSize(F)V

    sget-object v7, Landroid/graphics/Typeface;->DEFAULT_BOLD:Landroid/graphics/Typeface;

    invoke-virtual {v3, v7}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    const/4 v7, -0x1

    invoke-virtual {v3, v7}, Landroid/graphics/Paint;->setColor(I)V

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v7

    const/4 v8, 0x4

    if-ne v7, v8, :cond_3

    :cond_0
    :goto_1
    int-to-float v1, v1

    const/high16 v7, 0x4198

    invoke-virtual {v6, v0, v1, v7, v3}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    const/16 v0, 0x1f

    invoke-virtual {v6, v0}, Landroid/graphics/Canvas;->save(I)I

    invoke-virtual {v6}, Landroid/graphics/Canvas;->restore()V

    if-eq p3, v5, :cond_6

    mul-int v0, v4, p3

    div-int/2addr v0, v5

    invoke-static {v2, v0, p3, v10}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {v2}, Landroid/graphics/Bitmap;->recycle()V

    :goto_2
    return-object v0

    :cond_1
    if-le p1, p2, :cond_2

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v0, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, "+"

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto/16 :goto_0

    :cond_2
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v0, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, "-"

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto/16 :goto_0

    :cond_3
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v7

    const/4 v8, 0x3

    if-ne v7, v8, :cond_4

    const/16 v1, 0x19

    goto :goto_1

    :cond_4
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v7

    const/4 v8, 0x2

    if-ne v7, v8, :cond_5

    const/16 v1, 0x1d

    goto :goto_1

    :cond_5
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v7

    if-ne v7, v11, :cond_0

    const/16 v1, 0x22

    goto :goto_1

    :cond_6
    move-object v0, v2

    goto :goto_2
.end method


# virtual methods
.method public a(II)Landroid/graphics/Bitmap;
    .locals 4

    packed-switch p1, :pswitch_data_0

    const v0, 0x7f02001d

    :goto_0
    invoke-virtual {p0}, Lcom/xingbook/baike/d/c;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/content/res/Resources;->openRawResource(I)Ljava/io/InputStream;

    move-result-object v0

    invoke-static {v0}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;)Landroid/graphics/Bitmap;

    move-result-object v1

    int-to-float v0, p2

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v2

    int-to-float v2, v2

    div-float/2addr v0, v2

    const/high16 v2, 0x3f80

    cmpl-float v2, v0, v2

    if-eqz v2, :cond_0

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v2

    int-to-float v2, v2

    mul-float/2addr v2, v0

    float-to-int v2, v2

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v3

    int-to-float v3, v3

    mul-float/2addr v0, v3

    float-to-int v0, v0

    const/4 v3, 0x0

    invoke-static {v1, v2, v0, v3}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->recycle()V

    :goto_1
    return-object v0

    :pswitch_0
    const v0, 0x7f020018

    goto :goto_0

    :pswitch_1
    const v0, 0x7f020019

    goto :goto_0

    :pswitch_2
    const v0, 0x7f02001a

    goto :goto_0

    :pswitch_3
    const v0, 0x7f02001b

    goto :goto_0

    :pswitch_4
    const v0, 0x7f02001c

    goto :goto_0

    :cond_0
    move-object v0, v1

    goto :goto_1

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
    .end packed-switch
.end method

.method public a(Lcom/xingbook/baike/b/a;)V
    .locals 6

    iget v2, p0, Lcom/xingbook/baike/d/c;->b:F

    iget v3, p0, Lcom/xingbook/baike/d/c;->c:F

    iget v4, p0, Lcom/xingbook/baike/d/c;->d:F

    iget v5, p0, Lcom/xingbook/baike/d/c;->e:F

    move-object v0, p0

    move-object v1, p1

    invoke-virtual/range {v0 .. v5}, Lcom/xingbook/baike/d/c;->a(Lcom/xingbook/baike/b/a;FFFF)V

    return-void
.end method

.method public a(Lcom/xingbook/baike/b/a;FFFF)V
    .locals 5

    const/high16 v4, 0x4040

    iput-object p1, p0, Lcom/xingbook/baike/d/c;->h:Lcom/xingbook/baike/b/a;

    iput p2, p0, Lcom/xingbook/baike/d/c;->b:F

    iput p3, p0, Lcom/xingbook/baike/d/c;->c:F

    iput p4, p0, Lcom/xingbook/baike/d/c;->d:F

    iput p5, p0, Lcom/xingbook/baike/d/c;->e:F

    sub-float v0, p3, p2

    div-float/2addr v0, v4

    add-float/2addr v0, p2

    float-to-int v0, v0

    iget-object v1, p0, Lcom/xingbook/baike/d/c;->k:Landroid/graphics/Bitmap;

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    mul-int/2addr v1, v0

    iget-object v2, p0, Lcom/xingbook/baike/d/c;->k:Landroid/graphics/Bitmap;

    invoke-virtual {v2}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v2

    div-int/2addr v1, v2

    iget-object v2, p0, Lcom/xingbook/baike/d/c;->k:Landroid/graphics/Bitmap;

    invoke-virtual {v2}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v2

    if-eq v2, v0, :cond_0

    iget-object v2, p0, Lcom/xingbook/baike/d/c;->k:Landroid/graphics/Bitmap;

    const/4 v3, 0x0

    invoke-static {v2, v1, v0, v3}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

    move-result-object v1

    iget-object v2, p0, Lcom/xingbook/baike/d/c;->k:Landroid/graphics/Bitmap;

    invoke-virtual {v2}, Landroid/graphics/Bitmap;->recycle()V

    iput-object v1, p0, Lcom/xingbook/baike/d/c;->k:Landroid/graphics/Bitmap;

    :cond_0
    iget-object v1, p0, Lcom/xingbook/baike/d/c;->l:Landroid/graphics/Bitmap;

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcom/xingbook/baike/d/c;->l:Landroid/graphics/Bitmap;

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->recycle()V

    :cond_1
    invoke-virtual {p1}, Lcom/xingbook/baike/b/a;->B()I

    move-result v1

    invoke-virtual {p1}, Lcom/xingbook/baike/b/a;->C()I

    move-result v2

    invoke-direct {p0, v1, v2, v0}, Lcom/xingbook/baike/d/c;->a(III)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/baike/d/c;->l:Landroid/graphics/Bitmap;

    iget-object v0, p0, Lcom/xingbook/baike/d/c;->m:Landroid/graphics/Bitmap;

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/xingbook/baike/d/c;->m:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    :cond_2
    invoke-virtual {p1}, Lcom/xingbook/baike/b/a;->b()Lcom/xingbook/baike/b/b;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/baike/b/b;->d()I

    move-result v0

    iget v1, p0, Lcom/xingbook/baike/d/c;->d:F

    iget v2, p0, Lcom/xingbook/baike/d/c;->d:F

    sub-float v2, p5, v2

    div-float/2addr v2, v4

    add-float/2addr v1, v2

    float-to-int v1, v1

    invoke-virtual {p0, v0, v1}, Lcom/xingbook/baike/d/c;->a(II)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/baike/d/c;->m:Landroid/graphics/Bitmap;

    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 18

    move-object/from16 v0, p0

    iget-object v1, v0, Lcom/xingbook/baike/d/c;->h:Lcom/xingbook/baike/b/a;

    if-eqz v1, :cond_0

    move-object/from16 v0, p0

    iget-object v1, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v1, v1, Landroid/graphics/RectF;->right:F

    const/4 v2, 0x0

    cmpl-float v1, v1, v2

    if-eqz v1, :cond_0

    move-object/from16 v0, p0

    iget-object v1, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v1, v1, Landroid/graphics/RectF;->bottom:F

    const/4 v2, 0x0

    cmpl-float v1, v1, v2

    if-nez v1, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    move-object/from16 v0, p0

    iget-object v1, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v4, v1, Landroid/graphics/RectF;->right:F

    const/high16 v1, 0x4040

    move-object/from16 v0, p0

    iget v2, v0, Lcom/xingbook/baike/d/c;->a:F

    mul-float/2addr v1, v2

    float-to-int v3, v1

    const/4 v1, 0x0

    const/4 v2, 0x1

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->k:Landroid/graphics/Bitmap;

    invoke-virtual {v5}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v9

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->k:Landroid/graphics/Bitmap;

    invoke-virtual {v5}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v5

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/xingbook/baike/d/c;->l:Landroid/graphics/Bitmap;

    invoke-virtual {v6}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v10

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/xingbook/baike/d/c;->l:Landroid/graphics/Bitmap;

    invoke-virtual {v6}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v11

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/xingbook/baike/d/c;->h:Lcom/xingbook/baike/b/a;

    invoke-virtual {v6}, Lcom/xingbook/baike/b/a;->a()Z

    move-result v6

    if-eqz v6, :cond_2

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/xingbook/baike/d/c;->k:Landroid/graphics/Bitmap;

    move-object/from16 v0, p0

    iget v7, v0, Lcom/xingbook/baike/d/c;->c:F

    int-to-float v8, v9

    sub-float/2addr v7, v8

    const/high16 v8, 0x4000

    div-float/2addr v7, v8

    int-to-float v8, v3

    add-float/2addr v7, v8

    const/4 v8, 0x0

    move-object/from16 v0, p1

    invoke-virtual {v0, v6, v1, v7, v8}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    int-to-float v5, v5

    const/high16 v6, 0x40a0

    move-object/from16 v0, p0

    iget v7, v0, Lcom/xingbook/baike/d/c;->a:F

    mul-float/2addr v6, v7

    add-float/2addr v5, v6

    add-float/2addr v1, v5

    :cond_2
    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p0

    iget v6, v0, Lcom/xingbook/baike/d/c;->f:I

    invoke-virtual {v5, v6}, Landroid/graphics/Paint;->setColor(I)V

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p0

    iget v6, v0, Lcom/xingbook/baike/d/c;->b:F

    invoke-virtual {v5, v6}, Landroid/graphics/Paint;->setTextSize(F)V

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    const/4 v6, 0x1

    invoke-virtual {v5, v6}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    sget-object v6, Landroid/graphics/Typeface;->DEFAULT:Landroid/graphics/Typeface;

    invoke-virtual {v5, v6}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    invoke-virtual {v5}, Landroid/graphics/Paint;->getFontMetrics()Landroid/graphics/Paint$FontMetrics;

    move-result-object v5

    move-object/from16 v0, p0

    iget v6, v0, Lcom/xingbook/baike/d/c;->c:F

    iget v7, v5, Landroid/graphics/Paint$FontMetrics;->descent:F

    sub-float/2addr v6, v7

    iget v5, v5, Landroid/graphics/Paint$FontMetrics;->ascent:F

    sub-float v5, v6, v5

    const/high16 v6, 0x4000

    div-float v12, v5, v6

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->h:Lcom/xingbook/baike/b/a;

    invoke-virtual {v5}, Lcom/xingbook/baike/b/a;->u()Ljava/lang/String;

    move-result-object v13

    if-eqz v13, :cond_19

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    invoke-virtual {v5, v13}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v5

    add-float/2addr v5, v1

    cmpl-float v5, v5, v4

    if-lez v5, :cond_7

    invoke-virtual {v13}, Ljava/lang/String;->length()I

    move-result v14

    new-array v15, v14, [F

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    invoke-virtual {v5, v13, v15}, Landroid/graphics/Paint;->getTextWidths(Ljava/lang/String;[F)I

    const/4 v6, 0x0

    const/4 v5, 0x0

    move v7, v1

    move v8, v3

    move v3, v5

    move v5, v1

    move v1, v4

    move v4, v6

    move v6, v2

    :goto_1
    if-lt v3, v14, :cond_4

    move v2, v7

    move v7, v5

    move v5, v1

    move v1, v6

    move v6, v3

    move v3, v8

    :goto_2
    if-lez v6, :cond_17

    const/4 v8, 0x0

    cmpl-float v8, v7, v8

    if-lez v8, :cond_17

    invoke-virtual {v13, v4, v6}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v4

    int-to-float v5, v3

    add-float/2addr v5, v12

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v4, v2, v5, v6}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/xingbook/baike/d/c;->l:Landroid/graphics/Bitmap;

    move-object/from16 v0, p0

    iget v4, v0, Lcom/xingbook/baike/d/c;->c:F

    int-to-float v5, v10

    sub-float/2addr v4, v5

    const/high16 v5, 0x4000

    div-float/2addr v4, v5

    int-to-float v5, v3

    add-float/2addr v4, v5

    const/4 v5, 0x0

    move-object/from16 v0, p1

    invoke-virtual {v0, v2, v7, v4, v5}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    int-to-float v2, v3

    move-object/from16 v0, p0

    iget v3, v0, Lcom/xingbook/baike/d/c;->c:F

    add-float/2addr v2, v3

    float-to-int v3, v2

    const/4 v2, 0x0

    add-int/lit8 v1, v1, 0x1

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v4, v4, Landroid/graphics/RectF;->right:F

    :goto_3
    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p0

    iget v6, v0, Lcom/xingbook/baike/d/c;->g:I

    invoke-virtual {v5, v6}, Landroid/graphics/Paint;->setColor(I)V

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p0

    iget v6, v0, Lcom/xingbook/baike/d/c;->d:F

    invoke-virtual {v5, v6}, Landroid/graphics/Paint;->setTextSize(F)V

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    sget-object v6, Landroid/graphics/Typeface;->SERIF:Landroid/graphics/Typeface;

    invoke-virtual {v5, v6}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    invoke-virtual {v5}, Landroid/graphics/Paint;->getFontMetrics()Landroid/graphics/Paint$FontMetrics;

    move-result-object v5

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    const v7, -0x705e39

    invoke-virtual {v6, v7}, Landroid/graphics/Paint;->setColor(I)V

    move-object/from16 v0, p0

    iget v6, v0, Lcom/xingbook/baike/d/c;->c:F

    iget v7, v5, Landroid/graphics/Paint$FontMetrics;->descent:F

    sub-float/2addr v6, v7

    iget v5, v5, Landroid/graphics/Paint$FontMetrics;->ascent:F

    sub-float v5, v6, v5

    const/high16 v6, 0x4000

    div-float v8, v5, v6

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->h:Lcom/xingbook/baike/b/a;

    invoke-virtual {v5}, Lcom/xingbook/baike/b/a;->b()Lcom/xingbook/baike/b/b;

    move-result-object v5

    invoke-virtual {v5}, Lcom/xingbook/baike/b/b;->c()Ljava/lang/String;

    move-result-object v9

    if-eqz v9, :cond_e

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    invoke-virtual {v5, v9}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v5

    cmpl-float v5, v5, v4

    if-lez v5, :cond_c

    invoke-virtual {v9}, Ljava/lang/String;->length()I

    move-result v10

    new-array v11, v10, [F

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    invoke-virtual {v5, v9, v11}, Landroid/graphics/Paint;->getTextWidths(Ljava/lang/String;[F)I

    const/4 v7, 0x0

    const/4 v6, 0x0

    const/4 v5, 0x0

    move/from16 v16, v5

    move v5, v1

    move v1, v4

    move v4, v7

    move v7, v3

    move v3, v6

    move v6, v2

    move/from16 v2, v16

    :goto_4
    if-lt v2, v10, :cond_9

    move/from16 v16, v2

    move v2, v4

    move v4, v6

    move v6, v1

    move v1, v5

    move v5, v7

    move/from16 v7, v16

    :goto_5
    if-lez v7, :cond_15

    const/4 v10, 0x0

    cmpl-float v10, v2, v10

    if-lez v10, :cond_15

    invoke-virtual {v9, v3, v7}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

    int-to-float v7, v5

    add-float/2addr v7, v8

    move-object/from16 v0, p0

    iget-object v9, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v3, v4, v7, v9}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    move v3, v5

    move v4, v6

    :goto_6
    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->m:Landroid/graphics/Bitmap;

    invoke-virtual {v5}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v5

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/xingbook/baike/d/c;->m:Landroid/graphics/Bitmap;

    invoke-virtual {v6}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v6

    int-to-float v7, v5

    add-float/2addr v7, v2

    cmpl-float v4, v7, v4

    if-lez v4, :cond_3

    int-to-float v2, v3

    move-object/from16 v0, p0

    iget v3, v0, Lcom/xingbook/baike/d/c;->c:F

    add-float/2addr v2, v3

    float-to-int v3, v2

    const/4 v2, 0x0

    add-int/lit8 v1, v1, 0x1

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v4, v4, Landroid/graphics/RectF;->right:F

    :cond_3
    const/4 v4, 0x4

    if-le v1, v4, :cond_d

    invoke-super/range {p0 .. p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V

    goto/16 :goto_0

    :cond_4
    aget v2, v15, v3

    add-float/2addr v5, v2

    cmpl-float v2, v5, v1

    if-lez v2, :cond_18

    const/4 v2, 0x1

    if-ne v6, v2, :cond_5

    invoke-virtual {v13, v4, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    int-to-float v2, v8

    add-float/2addr v2, v12

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v1, v7, v2, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    aget v1, v15, v3

    int-to-float v2, v8

    move-object/from16 v0, p0

    iget v4, v0, Lcom/xingbook/baike/d/c;->c:F

    add-float/2addr v2, v4

    float-to-int v5, v2

    const/4 v4, 0x0

    add-int/lit8 v2, v6, 0x1

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v6, v6, Landroid/graphics/RectF;->right:F

    int-to-float v7, v11

    sub-float/2addr v6, v7

    move v7, v6

    move v6, v5

    move v5, v4

    move v4, v2

    move v2, v1

    move v1, v3

    :goto_7
    add-int/lit8 v3, v3, 0x1

    move v8, v6

    move v6, v4

    move v4, v1

    move v1, v7

    move v7, v5

    move v5, v2

    goto/16 :goto_1

    :cond_5
    const/4 v2, 0x2

    if-ne v6, v2, :cond_18

    add-int/lit8 v1, v3, -0x2

    if-le v1, v4, :cond_6

    new-instance v1, Ljava/lang/StringBuilder;

    add-int/lit8 v2, v3, -0x2

    invoke-virtual {v13, v4, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "\u2026"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    aget v1, v15, v3

    sub-float v1, v5, v1

    add-int/lit8 v11, v3, -0x1

    aget v11, v15, v11

    sub-float/2addr v1, v11

    add-int/lit8 v3, v3, -0x2

    aget v3, v15, v3

    sub-float/2addr v1, v3

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    const-string v11, "\u2026"

    invoke-virtual {v3, v11}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v3

    add-float/2addr v1, v3

    :goto_8
    int-to-float v3, v8

    add-float/2addr v3, v12

    move-object/from16 v0, p0

    iget-object v11, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v2, v7, v3, v11}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/xingbook/baike/d/c;->l:Landroid/graphics/Bitmap;

    move-object/from16 v0, p0

    iget v3, v0, Lcom/xingbook/baike/d/c;->c:F

    int-to-float v7, v9

    sub-float/2addr v3, v7

    const/high16 v7, 0x4000

    div-float/2addr v3, v7

    int-to-float v7, v8

    add-float/2addr v3, v7

    const/4 v7, 0x0

    move-object/from16 v0, p1

    invoke-virtual {v0, v2, v1, v3, v7}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    const/4 v3, 0x0

    int-to-float v1, v8

    move-object/from16 v0, p0

    iget v2, v0, Lcom/xingbook/baike/d/c;->c:F

    add-float/2addr v1, v2

    float-to-int v8, v1

    const/4 v2, 0x0

    add-int/lit8 v1, v6, 0x1

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v6, v6, Landroid/graphics/RectF;->right:F

    move v7, v5

    move v5, v6

    move v6, v3

    move v3, v8

    goto/16 :goto_2

    :cond_6
    const-string v2, "\u2026"

    move-object/from16 v0, p0

    iget-object v1, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    const-string v3, "\u2026"

    invoke-virtual {v1, v3}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v1

    goto :goto_8

    :cond_7
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    invoke-virtual {v2, v13}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v2

    add-float/2addr v2, v1

    int-to-float v5, v11

    add-float/2addr v2, v5

    cmpl-float v2, v2, v4

    if-lez v2, :cond_8

    const/4 v2, 0x0

    invoke-virtual {v13}, Ljava/lang/String;->length()I

    move-result v4

    add-int/lit8 v4, v4, -0x1

    invoke-virtual {v13, v2, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    int-to-float v4, v3

    add-float/2addr v4, v12

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v2, v1, v4, v5}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    int-to-float v1, v3

    move-object/from16 v0, p0

    iget v2, v0, Lcom/xingbook/baike/d/c;->c:F

    add-float/2addr v1, v2

    float-to-int v1, v1

    const/4 v2, 0x0

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v3, v3, Landroid/graphics/RectF;->right:F

    invoke-virtual {v13}, Ljava/lang/String;->length()I

    move-result v3

    add-int/lit8 v3, v3, -0x1

    invoke-virtual {v13}, Ljava/lang/String;->length()I

    move-result v4

    invoke-virtual {v13, v3, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

    int-to-float v4, v1

    add-float/2addr v4, v12

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v3, v2, v4, v5}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    invoke-virtual {v13}, Ljava/lang/String;->length()I

    move-result v3

    add-int/lit8 v3, v3, -0x1

    invoke-virtual {v13}, Ljava/lang/String;->length()I

    move-result v4

    invoke-virtual {v13, v3, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v2

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/xingbook/baike/d/c;->l:Landroid/graphics/Bitmap;

    move-object/from16 v0, p0

    iget v4, v0, Lcom/xingbook/baike/d/c;->c:F

    int-to-float v5, v10

    sub-float/2addr v4, v5

    const/high16 v5, 0x4000

    div-float/2addr v4, v5

    int-to-float v5, v1

    add-float/2addr v4, v5

    const/4 v5, 0x0

    move-object/from16 v0, p1

    invoke-virtual {v0, v3, v2, v4, v5}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    int-to-float v1, v1

    move-object/from16 v0, p0

    iget v2, v0, Lcom/xingbook/baike/d/c;->c:F

    add-float/2addr v1, v2

    float-to-int v3, v1

    const/4 v2, 0x0

    const/4 v1, 0x3

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v4, v4, Landroid/graphics/RectF;->right:F

    goto/16 :goto_3

    :cond_8
    int-to-float v2, v3

    add-float/2addr v2, v12

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v13, v1, v2, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    invoke-virtual {v2, v13}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v2

    add-float/2addr v1, v2

    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/xingbook/baike/d/c;->l:Landroid/graphics/Bitmap;

    move-object/from16 v0, p0

    iget v4, v0, Lcom/xingbook/baike/d/c;->c:F

    int-to-float v5, v10

    sub-float/2addr v4, v5

    const/high16 v5, 0x4000

    div-float/2addr v4, v5

    int-to-float v5, v3

    add-float/2addr v4, v5

    const/4 v5, 0x0

    move-object/from16 v0, p1

    invoke-virtual {v0, v2, v1, v4, v5}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    int-to-float v1, v3

    move-object/from16 v0, p0

    iget v2, v0, Lcom/xingbook/baike/d/c;->c:F

    add-float/2addr v1, v2

    float-to-int v3, v1

    const/4 v2, 0x0

    const/4 v1, 0x2

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v4, v4, Landroid/graphics/RectF;->right:F

    goto/16 :goto_3

    :cond_9
    aget v12, v11, v2

    add-float/2addr v4, v12

    cmpl-float v12, v4, v1

    if-lez v12, :cond_16

    const/4 v1, 0x4

    if-lt v5, v1, :cond_b

    add-int/lit8 v1, v2, -0x2

    if-le v1, v3, :cond_a

    new-instance v1, Ljava/lang/StringBuilder;

    add-int/lit8 v2, v2, -0x2

    invoke-virtual {v9, v3, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "\u2026"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    :goto_9
    int-to-float v2, v7

    add-float/2addr v2, v8

    move-object/from16 v0, p0

    iget-object v10, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v1, v6, v2, v10}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    const/4 v2, 0x0

    int-to-float v1, v7

    move-object/from16 v0, p0

    iget v6, v0, Lcom/xingbook/baike/d/c;->c:F

    add-float/2addr v1, v6

    float-to-int v7, v1

    const/4 v6, 0x0

    add-int/lit8 v1, v5, 0x1

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v5, v5, Landroid/graphics/RectF;->right:F

    move/from16 v16, v2

    move v2, v4

    move v4, v6

    move v6, v5

    move v5, v7

    move/from16 v7, v16

    goto/16 :goto_5

    :cond_a
    const-string v1, "\u2026"

    goto :goto_9

    :cond_b
    invoke-virtual {v9, v3, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    int-to-float v3, v7

    add-float/2addr v3, v8

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v1, v6, v3, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    aget v1, v11, v2

    int-to-float v3, v7

    move-object/from16 v0, p0

    iget v4, v0, Lcom/xingbook/baike/d/c;->c:F

    add-float/2addr v3, v4

    float-to-int v6, v3

    const/4 v4, 0x0

    add-int/lit8 v3, v5, 0x1

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v5, v5, Landroid/graphics/RectF;->right:F

    move v7, v5

    move v5, v4

    move v4, v3

    move v3, v1

    move v1, v2

    :goto_a
    add-int/lit8 v2, v2, 0x1

    move/from16 v16, v1

    move v1, v7

    move v7, v6

    move v6, v5

    move v5, v4

    move v4, v3

    move/from16 v3, v16

    goto/16 :goto_4

    :cond_c
    int-to-float v5, v3

    add-float/2addr v5, v8

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v9, v2, v5, v6}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    invoke-virtual {v5, v9}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v5

    add-float/2addr v2, v5

    goto/16 :goto_6

    :cond_d
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->m:Landroid/graphics/Bitmap;

    move-object/from16 v0, p0

    iget v7, v0, Lcom/xingbook/baike/d/c;->e:F

    int-to-float v6, v6

    sub-float v6, v7, v6

    const/high16 v7, 0x4000

    div-float/2addr v6, v7

    int-to-float v7, v3

    add-float/2addr v6, v7

    const/4 v7, 0x0

    move-object/from16 v0, p1

    invoke-virtual {v0, v4, v2, v6, v7}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    int-to-float v4, v5

    add-float/2addr v2, v4

    :cond_e
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v4, v4, Landroid/graphics/RectF;->right:F

    sub-float v7, v4, v2

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->h:Lcom/xingbook/baike/b/a;

    invoke-virtual {v4}, Lcom/xingbook/baike/b/a;->ab()Ljava/lang/String;

    move-result-object v9

    if-eqz v9, :cond_f

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p0

    iget v5, v0, Lcom/xingbook/baike/d/c;->g:I

    invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setColor(I)V

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    invoke-virtual {v4, v9}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v4

    cmpl-float v4, v4, v7

    if-lez v4, :cond_13

    invoke-virtual {v9}, Ljava/lang/String;->length()I

    move-result v10

    new-array v11, v10, [F

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    invoke-virtual {v4, v9, v11}, Landroid/graphics/Paint;->getTextWidths(Ljava/lang/String;[F)I

    const/4 v6, 0x0

    const/4 v5, 0x0

    const/4 v4, 0x0

    move/from16 v16, v4

    move v4, v6

    move v6, v2

    move/from16 v2, v16

    move/from16 v17, v1

    move v1, v7

    move v7, v3

    move v3, v5

    move/from16 v5, v17

    :goto_b
    if-lt v2, v10, :cond_10

    :goto_c
    if-lez v2, :cond_f

    const/4 v1, 0x0

    cmpl-float v1, v4, v1

    if-lez v1, :cond_f

    invoke-virtual {v9, v3, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    int-to-float v2, v7

    add-float/2addr v2, v8

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v1, v6, v2, v3}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    :cond_f
    :goto_d
    invoke-super/range {p0 .. p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V

    goto/16 :goto_0

    :cond_10
    aget v12, v11, v2

    add-float/2addr v4, v12

    cmpl-float v12, v4, v1

    if-lez v12, :cond_14

    const/4 v1, 0x4

    if-lt v5, v1, :cond_12

    add-int/lit8 v1, v2, -0x2

    if-le v1, v3, :cond_11

    new-instance v1, Ljava/lang/StringBuilder;

    add-int/lit8 v2, v2, -0x2

    invoke-virtual {v9, v3, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "\u2026"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    :goto_e
    int-to-float v2, v7

    add-float/2addr v2, v8

    move-object/from16 v0, p0

    iget-object v10, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v1, v6, v2, v10}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    const/4 v2, 0x0

    int-to-float v1, v7

    move-object/from16 v0, p0

    iget v6, v0, Lcom/xingbook/baike/d/c;->c:F

    add-float/2addr v1, v6

    float-to-int v7, v1

    const/4 v6, 0x0

    add-int/lit8 v1, v5, 0x1

    move-object/from16 v0, p0

    iget-object v1, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v1, v1, Landroid/graphics/RectF;->right:F

    goto :goto_c

    :cond_11
    const-string v1, "\u2026"

    goto :goto_e

    :cond_12
    invoke-virtual {v9, v3, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    int-to-float v3, v7

    add-float/2addr v3, v8

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v1, v6, v3, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    aget v1, v11, v2

    int-to-float v3, v7

    move-object/from16 v0, p0

    iget v4, v0, Lcom/xingbook/baike/d/c;->c:F

    add-float/2addr v3, v4

    float-to-int v6, v3

    const/4 v4, 0x0

    add-int/lit8 v3, v5, 0x1

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    iget v5, v5, Landroid/graphics/RectF;->right:F

    move v7, v5

    move v5, v4

    move v4, v3

    move v3, v1

    move v1, v2

    :goto_f
    add-int/lit8 v2, v2, 0x1

    move/from16 v16, v1

    move v1, v7

    move v7, v6

    move v6, v5

    move v5, v4

    move v4, v3

    move/from16 v3, v16

    goto/16 :goto_b

    :cond_13
    int-to-float v1, v3

    add-float/2addr v1, v8

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    move-object/from16 v0, p1

    invoke-virtual {v0, v9, v2, v1, v3}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    move-object/from16 v0, p0

    iget-object v1, v0, Lcom/xingbook/baike/d/c;->i:Landroid/graphics/Paint;

    invoke-virtual {v1, v9}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F

    move-result v1

    add-float/2addr v1, v2

    goto/16 :goto_d

    :cond_14
    move/from16 v16, v3

    move v3, v4

    move v4, v5

    move v5, v6

    move v6, v7

    move v7, v1

    move/from16 v1, v16

    goto :goto_f

    :cond_15
    move v2, v4

    move v3, v5

    move v4, v6

    goto/16 :goto_6

    :cond_16
    move/from16 v16, v3

    move v3, v4

    move v4, v5

    move v5, v6

    move v6, v7

    move v7, v1

    move/from16 v1, v16

    goto/16 :goto_a

    :cond_17
    move v4, v5

    goto/16 :goto_3

    :cond_18
    move v2, v5

    move v5, v7

    move v7, v1

    move v1, v4

    move v4, v6

    move v6, v8

    goto/16 :goto_7

    :cond_19
    move/from16 v16, v2

    move v2, v1

    move/from16 v1, v16

    goto/16 :goto_3
.end method

.method protected onLayout(ZIIII)V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    sub-int v1, p4, p2

    int-to-float v1, v1

    iput v1, v0, Landroid/graphics/RectF;->right:F

    iget-object v0, p0, Lcom/xingbook/baike/d/c;->j:Landroid/graphics/RectF;

    sub-int v1, p5, p3

    int-to-float v1, v1

    iput v1, v0, Landroid/graphics/RectF;->bottom:F

    invoke-super/range {p0 .. p5}, Landroid/view/View;->onLayout(ZIIII)V

    return-void
.end method
